// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.

// Fighting For Dream

import 'element-ui/lib/theme-chalk/index.css';
import './assets/common.css';

import './assets/common/beautify';
import './assets/common/beautify-css';
import './assets/common/beautify-html';

import Vue from 'vue';
import store from './store/index'
import App from './App'
// import router from './router'
import ElementUI from 'element-ui'
// import 'element-ui/lib/theme-chalk/index.css';

Vue.use(ElementUI);
Vue.config.productionTip = false

import axios from 'axios';
Vue.prototype.axios = axios;

var _$Events = window._$Events || false;
if (_$Events) {
  _$Events.onReady(function () {
    if (window.ClientApi) {
      Vue.prototype.ClientApi = window.ClientApi;
    } else {
      Vue.prototype.ClientApi = null;
    };
    new Vue({
      el: '#app',
      // router,
      store,
      components: { App },
      template: '<App/>'
    });
  });
} else {
  new Vue({
    el: '#app',
    // router,
    store,
    components: { App },
    template: '<App/>'
  });
}




window.store = store;

window.doNothing = function () {
  window.event.returnValue = false;
  return false;
};


document.addEventListener('keydown', function (e) {
  e = window.event || e;
  var keycode = e.keyCode || e.which;
  if (e.ctrlKey && keycode == 187) {
    e.preventDefault();
    window.event.returnValue = false;
  };
  if (e.ctrlKey && keycode == 189) {
    e.preventDefault();
    window.event.returnValue = false;
  };
  if (e.ctrlKey && keycode == 107) {
    e.preventDefault();
    window.event.returnValue = false;
  };
  if (e.ctrlKey && keycode == 109) {
    e.preventDefault();
    window.event.returnValue = false;
  };
});